package com.dkd.manage.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.dkd.common.annotation.Excel;
import com.dkd.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 折扣策略对象 tb_strategy
 *
 * @author ruoyi
 * @date 2025-11-10
 */
public class Strategy extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 策略名称 */
    @Excel(name = "策略名称")
    private String strategyName;

    /** 策略描述 */
    @Excel(name = "策略描述")
    private String strategyDesc;

    /** 折扣类型：1-百分比折扣，2-固定金额折扣 */
    @Excel(name = "折扣类型", readConverterExp = "1=百分比折扣,2=固定金额折扣")
    private Integer discountType;

    /** 折扣值 */
    @Excel(name = "折扣值")
    private BigDecimal discountValue;

    /** 最低消费金额 */
    @Excel(name = "最低消费金额")
    private BigDecimal minAmount;

    /** 最大折扣金额 */
    @Excel(name = "最大折扣金额")
    private BigDecimal maxDiscount;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 状态：0-禁用，1-启用 */
    @Excel(name = "状态", readConverterExp = "0=禁用,1=启用")
    private Integer status;

    /** 策略设备关联列表 */
    private List<StrategyDevice> strategyDeviceList;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setStrategyName(String strategyName)
    {
        this.strategyName = strategyName;
    }

    public String getStrategyName()
    {
        return strategyName;
    }
    public void setStrategyDesc(String strategyDesc)
    {
        this.strategyDesc = strategyDesc;
    }

    public String getStrategyDesc()
    {
        return strategyDesc;
    }
    public void setDiscountType(Integer discountType)
    {
        this.discountType = discountType;
    }

    public Integer getDiscountType()
    {
        return discountType;
    }
    public void setDiscountValue(BigDecimal discountValue)
    {
        this.discountValue = discountValue;
    }

    public BigDecimal getDiscountValue()
    {
        return discountValue;
    }
    public void setMinAmount(BigDecimal minAmount)
    {
        this.minAmount = minAmount;
    }

    public BigDecimal getMinAmount()
    {
        return minAmount;
    }
    public void setMaxDiscount(BigDecimal maxDiscount)
    {
        this.maxDiscount = maxDiscount;
    }

    public BigDecimal getMaxDiscount()
    {
        return maxDiscount;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }

    public List<StrategyDevice> getStrategyDeviceList() {
        return strategyDeviceList;
    }

    public void setStrategyDeviceList(List<StrategyDevice> strategyDeviceList) {
        this.strategyDeviceList = strategyDeviceList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("strategyName", getStrategyName())
            .append("strategyDesc", getStrategyDesc())
            .append("discountType", getDiscountType())
            .append("discountValue", getDiscountValue())
            .append("minAmount", getMinAmount())
            .append("maxDiscount", getMaxDiscount())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}